package com.apps.member.account.model.po;

import java.math.BigDecimal;

import com.apps.sannotation.constraints.NumDef;
import com.apps.sannotation.constraints.StrDef;
import com.apps.sannotation.identity.GmtCreate;
import com.apps.sannotation.identity.GmtModify;
import com.apps.sannotation.identity.MemberId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 大鹏
 * @since 2020-10-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("kupa_account")
public class KupaAccount implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @MemberId
    private Integer member_id;

    /**
     * 总收入
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal total_income;

    /**
     * 总支出
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal total_spend;

    /**
     * 可用余额
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal available_balance;

    /**
     * 冻结金额
     */
    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal frozen_balance;

    @GmtCreate
    private LocalDateTime gmt_create;
    @GmtModify
    private LocalDateTime gmt_modify;
    @StrDef("")
    private String remark;


    public static final String ID = "id";

    public static final String MEMBER_ID = "member_id";

    public static final String TOTAL__INCOME = "total__income";

    public static final String TOTAL_SPEND = "total_spend";

    public static final String AVAILABLE_BALANCE = "available_balance";

    public static final String FROZEN_BALANCE = "frozen_balance";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFY = "gmt_modify";

    public static final String REMARK = "remark";

}
